package com.zhongfl.crm.enums.boss;

import lombok.Getter;

/**
 * 金科订单操作类型
 * @author zzk
 * @date 2019/01/21
 */
public enum BossJinKeOperType {

    CREATED(1,"创建订单"),
    CANCEL(0,"取消订单"),

    OTHER(2,"其他");

    @Getter
    private Integer  key;
    @Getter
    private String name;

    BossJinKeOperType(Integer key, String name) {
        this.key = key;
        this.name = name;
    }

    public static BossJinKeOperType getEnumByKey(Integer key) {
        for (BossJinKeOperType item : BossJinKeOperType.values()) {
            if (item.getKey().equals(key)) {
                return item;
            }
        }
        return OTHER;
    }

}
